package com.tongjie.hotelbooking.utils;

import org.apache.commons.lang3.time.DateUtils;

import java.text.ParseException;
import java.util.Date;

public class DateUtil {

    public static Date parseDate(String dateStr, String pattens) {
        try {
            return DateUtils.parseDate(dateStr, pattens);
        } catch (ParseException e) {
            throw new RuntimeException("date parse error", e);
        }
    }

}
